The use of foams for pharmaceutical purposes is well known particularly in the field of contraception as vaginal foams and in the treatment of hyperacidity as antiacid foams. The effectiveness of both types of foams has been hindered by the short life such foams in the aqueous environment in which both find themselves. While foaming action is quite simple to initiate, the very presence of the environmental aqueous fluids which initiate the foaming serve to rapidly dilute the foam to a point where it no longer exists in this form. A composition capable of foaming rapidly on the one hand but producing a foam with a substantial foam life is a long felt need. Such foaming compositions, provided that they are made of biochemically compatible materials, can be utilized as carriers or sustained release devices for numerous pharmaceutically active compositions.